function getQueryParams() {
    var url = location.search; //获取url中"?"符后的字串
    let params = {};
    let queryString = url.split('?')[1]; // 获取?后面的字符串
    if (queryString) {
        let pairs = queryString.split('&'); // 将字符串按&分隔成键值对数组
        for (let i = 0; i < pairs.length; i++) {
            let pair = pairs[i].split('='); // 将键值对按=分隔
            let key = decodeURIComponent(pair[0]); // 解码键
            // 解码值
            params[key] = decodeURIComponent(pair[1]); // 存储键值对
        }
    }
    return params;
}